class UserModel {
  List<Items> items;
  String doctorName;
  int currentMemberNum;
  int totalMemberNum;

  UserModel({this.items});

  UserModel.fromJson(Map<String, dynamic> json) {
    if (json['items'] != null) {
      items = new List<Items>();
      json['items'].forEach((v) {
        items.add(new Items.fromJson(v));
      });
    }
    doctorName = json['doctor_name'];
    currentMemberNum = json['current_member_num'];
    totalMemberNum = json['total_member_num'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.items != null) {
      data['items'] = this.items.map((v) => v.toJson()).toList();
    }
    data['doctor_name'] = this.doctorName;
    data['current_member_num'] = this.currentMemberNum;
    data['total_member_num'] = this.totalMemberNum;
    return data;
  }
}

class Items {
  String sId;
  String phoneNum;
  int createdAt;
  String name;
  String avatar;
  int appointTime;
  bool isMember;

  Items({this.sId, this.phoneNum, this.createdAt, this.name, this.avatar, this.isMember});

  Items.fromJson(Map<String, dynamic> json) {
    sId = json['_id'];
    phoneNum = json['phoneNum'];
    createdAt = json['createdAt'];
    name = json['name'];
    avatar = json['avatar'];
    appointTime = json['appoint_time'];
    isMember = json['is_member'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['_id'] = this.sId;
    data['phoneNum'] = this.phoneNum;
    data['createdAt'] = this.createdAt;
    data['name'] = this.name;
    data['avatar'] = this.avatar;
    data['appoint_time'] = this.appointTime;
    data['is_member'] = this.isMember;
    return data;
  }
}

class Assistant {
  String sId;
  String nickName;
  String avatar;
  String phoneNum;
  String token;
  String name;
  String qrCode;
  String motto;

  Assistant({this.sId, this.nickName, this.avatar, this.phoneNum});

  Assistant.fromJson(Map<String, dynamic> json) {
    sId = json['_id'];
    nickName = json['nick_name'];
    avatar = json['avatar'];
    phoneNum = json['phone_num'];
    token = json['token'];
    name = json['name'];
    qrCode = json['qr_code'];
    motto = json['motto'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['_id'] = this.sId;
    data['nick_name'] = this.nickName;
    data['avatar'] = this.avatar;
    data['phone_num'] = this.phoneNum;
    data['token'] = this.token;
    data['name'] = this.name;
    data['qr_code'] = this.qrCode;
    data['motto'] = this.motto;
    return data;
  }
}



